package uniandes.caing.ccambios.entidades;

public class Line {

	private LineChangeLabel lineChangeLabel;
	private int number;
	private String sourceCodeLine;
	private String historicalData = "";

	public Line(int number, String sourceCodeLine) {
		this.number = number;
		this.sourceCodeLine = sourceCodeLine;
		this.lineChangeLabel = null;
	}

	public LineChangeLabel getLineChangeLabel() {

		if (lineChangeLabel == null) {
			return new LineChangeLabel(0, ChangeLineType.Unchanged, "");

		} else

			return lineChangeLabel;
	}

	public void setLineChangeLabel(LineChangeLabel lineChangeLabel) {
		this.lineChangeLabel = lineChangeLabel;
	}

	public String getHistoricalData() {
		return historicalData;
	}

	public void setHistoricalData(String historicalData) {
		this.historicalData = historicalData;
	}

	public void setNumber(int number) {
		this.number = number;
	}

	public void setSourceCodeLine(String sourceCodeLine) {
		this.sourceCodeLine = sourceCodeLine;
	}

	/**
	 * @return the number
	 */
	public int getNumber() {
		return number;
	}

	/**
	 * @return the sourceCodeLine
	 */
	public String getSourceCodeLine() {
		return sourceCodeLine;
	}

	/**
	 * @return LineChangeLabelsPrint
	 */
	public String getLineChangeLabelsPrint() {

		return (lineChangeLabel != null) ? lineChangeLabel
				.getLineChangeLabelPrint() : "";

	}

}
